/**
 * Table Class which contains data as rows and columns.
 * It can insert new data , modify and delete exist data.
 * It has informations like name , id and columns informations. 
 */
package table;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import table.node.DataNode;

public interface DataTable {

	/*
	 * seters & geters
	 */

	public void setDataTableName(String rowName);
	public String getDataTableName();
	public String getDescription();

	public void setColList(List<Col> colList);
	public List<Col> getColList();
	public List<Row> getRowList();
	public Col getColByName(String colName);
	public Col getDataIdCol();
	/**
	 * base operation of data.
	 * @param dataMapList arguments map
	 * @return if the operate is successfully done return true else false.
	 */
	public boolean setData(SetDataParamenters p);
	public boolean clearData();
	public boolean setColsDataByCols(List<String> dstColNames, List<String> srcColNames);

	public DataNode run(HttpServletRequest request);
	public boolean insert(List<Row> rowList);
	public boolean delete(List<Row> rowList);
	public boolean modify(List<Row> rowList);

	public int getPageCount(SetDataParamenters p);
	/**
	 * get data as table
	 * @return the data as table
	 */
	public List<Object> getData();
	
	public boolean isDeleteFlag();
	public boolean isInsertFlag();
	public boolean isModifyFlag();
	
}
